﻿#region My Group
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using Entities;
using System.Data;

namespace Interface
{
    [ServiceContract]
    public interface IDataObject
    {
        #region Dùng chunga
        [OperationContract]
        DateTime SelectDate();
        //ham lay id cac bang
        [OperationContract]
        Entities.GetID SelectID(Entities.GetID id);
        //ham lay combobox cac bang
        [OperationContract]
        Entities.GetCombobox[] SelectCombox(Entities.GetCombobox combox);
        [OperationContract]
        byte[] GetImage(string linksRoot);
        [OperationContract]
        Entities.HienThiHangHoaListview[] SelectChiTietHangHoaCacBang(Entities.HienThiHangHoaListview hoadon);
        #endregion

        #region Vương Văn Hùng

        #region Nhân viên
        //Select
        [OperationContract]
        Entities.NhanVien[] SelectNhanVien(Entities.NhanVien nhanvien);
        //Insert or Update
        [OperationContract]
        int InsertUpdateNhanVien(Entities.NhanVien nhanvien);
        //Xoa
        [OperationContract]
        int DeletedNhanVien(Entities.NhanVien nhanvien);
        #endregion

        #region Nhà cung cấp
        [OperationContract]
        Entities.NhaCungCap[] SelectNhaCungCap(Entities.NhaCungCap cungcap);
        [OperationContract]
        int InsertUpdateNhaCungCap(Entities.NhaCungCap cungcap);
        [OperationContract]
        int DeleteNhaCungCap(Entities.NhaCungCap cungcap);
        #endregion

        #region Chi tiết hàng hóa nhà cung cấp
        [OperationContract]
        Entities.ChiTietHangHoaNhaCungCap[] SelectChiTietHangHoaNhaCungCap(Entities.ChiTietHangHoaNhaCungCap chitiet);
        [OperationContract]
        int InsertUpdate(Entities.ChiTietHangHoaNhaCungCap[] cungcap);
        [OperationContract]
        int Delete(Entities.ChiTietHangHoaNhaCungCap cungcap);
        #endregion

        #region Đơn đặt hàng nhà cung cấp
         [OperationContract]
        Entities.DonDatHangNCC[] SelectDonDatHangNCC(Entities.DonDatHangNCC hoadon);
        #endregion

        #region Hóa đơn nhập kho
         [OperationContract]
         Entities.HoaDonNhap[] SelectHoaDonNhap(Entities.HoaDonNhap hoadon);
         [OperationContract]
         int InsertUpdateHoaDonNhap(Entities.HoaDonNhap hoadon);
         #endregion

        #region Chi tiết hóa đơn nhập kho
         [OperationContract]
         Entities.ChiTietHoaDonNhap[] SelectChiTietHoaDonNhap(Entities.ChiTietHoaDonNhap hoadon);
         [OperationContract]
         int InsertUpdateListChiTietHoaDonNhap(Entities.ChiTietHoaDonNhap[] chitiet);
         [OperationContract]
         int InsertUpdateChiTietHoaDonNhap(Entities.ChiTietHoaDonNhap chitiet);
         #endregion

        #region Khách hàng trả lại bán buôn
         [OperationContract]
         Entities.KhachHangTraLaiBanBuon[] SelectKhachHangTraLaiBanBuon(Entities.KhachHangTraLaiBanBuon hoadon);
         [OperationContract]
         int InsertUpdateKhachHangTraLaiBanBuon(Entities.KhachHangTraLaiBanBuon hoadon);
         #endregion

        #region Chi tiết khách hàng trả lại bán buôn
         [OperationContract]
         Entities.ChiTietKhachHangTraLaiBanBuon[] SelectChiTietKhachHangTraLaiBanBuon(Entities.ChiTietKhachHangTraLaiBanBuon hoadon);
         //[OperationContract]
         //int InsertUpdateChiTietKhachHangTraLaiBanBuon(Entities.ChiTietKhachHangTraLaiBanBuon[] hoadon);

         #endregion

        #region Khách hàng trả lại bán lẻ
         [OperationContract]
         Entities.KhachHangTraLaiBanLe[] SelectKhachHangTraLaiBanLe(Entities.KhachHangTraLaiBanLe hoadon);
         [OperationContract]
         int InsertUpdateKhachHangTraLaiBanLe(Entities.KhachHangTraLaiBanLe hoadon);

         #endregion

        #region Chi tiết khách hàng trả lại bán lẻ
         [OperationContract]
         Entities.ChiTietKhachHangTraLaiBanLe[] SelectChiTietKhachHangTraLaiBanLe(Entities.ChiTietKhachHangTraLaiBanLe hoadon);
         [OperationContract]
         int InsertUpdateChiTietKhachHangTraLaiBanLe(Entities.ChiTietKhachHangTraLaiBanLe hoadon);
         #endregion

         #region Cập nhật
         [OperationContract]
         int Update_DuNo(string HanhDong, string MaUpdate, string DuNo);
         [OperationContract]
         int Update_SoLuongConLai(string HanhDong, string MaHoaDon, string MaHangHoa, string SoLuongConLai);
         [OperationContract]
         int Update_TrangThaiDonDatHang(string HanhDong, string MaDonDatHang, string TrangThai);
         #endregion

         #region Trừ kho cộng kho
         [OperationContract]
         int CongKhoHang(string MaKho, string MaHangHoa, string SoLuong);
         [OperationContract]
         int TruKhoHang(string MaKho, string MaHangHoa, string SoLuong);
         #endregion

        #endregion

        #region Nguyễn Thu Hương
         #region báo cáo xuất hủy hàng hóa
         [OperationContract]
         Entities.BCXuatHuyHangHoa BCXuatHuyHangHoa();
         #endregion
         #region báo cáo công nợ ncc
         [OperationContract]
         Entities.SelectTongHopCongNo SelectTongHopCongNoNCC(string hanhdong);
            #endregion
         #region nhóm hàng hóa
         [OperationContract]
         Entities.HangHoa[] SelectHangHoaTheoNhomHangHoa(Entities.HangHoa donvitinh);
        [OperationContract]
        Entities.NhomHangHoa[] SelectNhomHangHoa(Entities.NhomHangHoa donvitinh);
        [OperationContract]
        int InsertUpdateNhomHangHoa(Entities.NhomHangHoa donvitinh);
        [OperationContract]
        int DeletedNhomHangHoa(Entities.NhomHangHoa donvitinh);
        #endregion

        #region đơn vị tính
        [OperationContract]
        Entities.DVT[] SelectDVT(Entities.DVT donvitinh);
        [OperationContract]
        int InsertUpdateDVT(Entities.DVT donvitinh);
        [OperationContract]
        int DeletedDVT(Entities.DVT donvitinh);
        [OperationContract]
        Entities.KhachHang[]  SelectKhachHang(Entities.KhachHang donvitinh);
        #endregion

        #region khách hàng
        [OperationContract]
        Entities.KhachHang[] SelectKH(Entities.KhachHang khachhang);
        [OperationContract]
        int InsertUpdateKH(Entities.KhachHang khachhang);
        [OperationContract]
        int DeletedKH(Entities.KhachHang khachhang);
        #endregion

        #region công ty
        [OperationContract]
        Entities.KhachHang Select_KhachHang(Entities.KhachHang kh);
        [OperationContract]
        Entities.NhaCungCap Select_MaNCC(Entities.NhaCungCap ncc);
        [OperationContract]
        Entities.CongTy[] SelectCongTy(Entities.CongTy congty);
        [OperationContract]
        int InsertUpdateCongTy(Entities.CongTy congty);
        #endregion

        #region thuế
        [OperationContract]
        Entities.Thue[] SelectThue(Entities.Thue thue);
        [OperationContract]
        int InsertUpdateThue(Entities.Thue thue);
        [OperationContract]
        int DeletedThue(Entities.Thue thue);
        #endregion

        #region tiền tệ
        [OperationContract]
        Entities.TienTe[] SelectTienTe(Entities.TienTe tiente);
        [OperationContract]
        int InsertUpdateTienTe(Entities.TienTe tiente);
        [OperationContract]
        int DeletedTienTe(Entities.TienTe tiente);
        #endregion

        #region loại hàng
        [OperationContract]
        Entities.LoaiHang[] SelectLoaiHang(Entities.LoaiHang LoaiHang);
        [OperationContract]
        int InsertUpdateLoaiHang(Entities.LoaiHang LoaiHang);
        [OperationContract]
        int DeletedLoaiHang(Entities.LoaiHang LoaiHang);
        #endregion

        #region gói hàng
        [OperationContract]
        Entities.GoiHang[] SelectGoiHangTheoMa(Entities.GoiHang GoiHang);
        [OperationContract]
        Entities.GoiHang[] SelectGoiHang(Entities.GoiHang GoiHang);
        [OperationContract]
        int InsertUpdateGoiHang(Entities.GoiHang GoiHang);
        [OperationContract]
        int DeletedGoiHang(Entities.GoiHang GoiHang);
        #endregion

        #region chi tiết gói hàng
        [OperationContract]
        Entities.ChiTietGoiHang[] SelectChiTietGoiHang(Entities.ChiTietGoiHang ChiTietGoiHang);
        [OperationContract]
        int InsertUpdateChiTietGoiHang(Entities.ChiTietGoiHang[] ChiTietGoiHang);
        [OperationContract]
        int DeletedChiTietGoiHang(Entities.ChiTietGoiHang ChiTietGoiHang);
        #endregion

        #region phòng ban
        [OperationContract]
        Entities.PhongBan[] SelectPhongBan(Entities.PhongBan PhongBan);
        [OperationContract]
        int InsertUpdatePhongBan(Entities.PhongBan PhongBan);
        [OperationContract]
        int DeletedPhongBan(Entities.PhongBan PhongBan);
        #endregion

        #region phiếu xuất hủy
        [OperationContract]
        Entities.PhieuXuatHuy[] SelectPhieuXuatHuy(Entities.PhieuXuatHuy PhongBan);
        [OperationContract]
        Entities.PhieuXuatHuy[] SelectPhieuXuatHuy1(Entities.PhieuXuatHuy PhongBan);
        [OperationContract]
        int InsertUpdatePhieuXuatHuy(Entities.PhieuXuatHuy PhongBan);
        [OperationContract]
        int DeletedPhieuXuatHuy(Entities.PhieuXuatHuy PhongBan);
        [OperationContract]
        void TruKhoPhieuXuatHuy(Entities.ChiTietKhoHang[] PhongBan);
        #endregion

        #region chi tiết xuất hủy
        [OperationContract]
        Entities.ChiTietXuatHuy[] SelectChiTietXuatHuy(Entities.ChiTietXuatHuy ChiTietGoiHang);
        [OperationContract]
        Entities.ChiTietXuatHuy[] SelectChiTietXuatHuy1(Entities.ChiTietXuatHuy ChiTietGoiHang);
        [OperationContract]
        int InsertUpdateChiTietXuatHuy(Entities.ChiTietXuatHuy[] ChiTietGoiHang);
        [OperationContract]
        int DeletedChiTietXuatHuy(Entities.ChiTietXuatHuy ChiTietGoiHang);
        #endregion

        #region kiểm kê kho
        [OperationContract]
        Entities.KiemKeKho[] SelectKiemKeKho(Entities.KiemKeKho PhongBan);
        [OperationContract]
        int InsertUpdateKiemKeKho(Entities.KiemKeKho PhongBan);
        #endregion

        #region chi tiết kiểm kê kho
        [OperationContract]
        Entities.ChiTietKiemKeKho[] SelectChiTietKiemKeKho(Entities.ChiTietKiemKeKho ChiTietGoiHang);
        [OperationContract]
        int InsertUpdateChiTietKiemKeKho(Entities.ChiTietKiemKeKho[] ChiTietGoiHang);
        [OperationContract]
        int DeleteChiTietKiemKeKho(Entities.ChiTietKiemKeKho ChiTietGoiHang);
        #endregion

        #region chi tiết giao dịch khách hàng
        //[OperationContract]
        //Entities.SelectChiTietGiaoDichKhachHang SelectChitietgiaodichkhachhang(Entities.KhachHang kh, string makho);
        #endregion

        #region mã vạch
        [OperationContract]
        Entities.ThongTinMaVach[] ThongTinMaVachHangHoa(Entities.ThongTinMaVach MaVach);
        [OperationContract]
        Entities.HienThi_ChiTiet_DonDatHang HienThi_ChiTiet_DonDatHang(Entities.HienThi_ChiTiet_DonDatHang MaVach);
        #endregion
        #endregion

        #region Nguyễn Thế Hưởng
        #region Luu Viet
        //Select
        [OperationContract]
        Entities.LuuVietHeThong[] SelectLuuViet();
        //Delete
        [OperationContract]
        void DeleteLuuViet();
        #endregion
        #region Sao Luu

        [OperationContract]
        bool BackUp();
        //Select
        [OperationContract]
        Entities.SaoLuuHeThong[] SelectSaoLuu();
        //Restore 
        [OperationContract]
        bool Restore(Entities.SaoLuuHeThong sl);
        #endregion
        #region Phan Quyen
        [OperationContract]
        DataTable SelectChiTietQuyen(string tennhomquyen);

        [OperationContract]
        int InsertChiTietQuyen(Entities.ChiTietQuyen ctq);

        [OperationContract]
        bool UpdateChiTietQuyen(Entities.ChiTietQuyen[] actq, Entities.TaiKhoan TK);

        [OperationContract]
        int InsertNhomQuyen(Entities.NhomQuyen nq);

        [OperationContract]
        int DeleteNhomQuyen(Entities.NhomQuyen nq);

        [OperationContract]
        DataTable SelectNhomQuyen();

        [OperationContract]
        DataTable SelectQuyen();

        [OperationContract]
        Entities.TaiKhoan DangNhap(string taikhoan, string matkhau);

        [OperationContract]
        int InsertTaiKhoan(Entities.TaiKhoan tk);

        [OperationContract]
        int UpdateTaiKhoan(Entities.TaiKhoan tk);

        [OperationContract]
        int DeleteTaiKhoan(Entities.TaiKhoan tk);

        [OperationContract]
        DataTable SelectTaiKhoan();

        [OperationContract]
        Entities.TaiKhoan SelectTaiKhoanTheoTen(string tendangnhap);


        #endregion
        #region Đơn đặt hàng
        [OperationContract]
        Entities.ChiTietDonHangKH[] SelectChiTietDonHangKH(string madhhkh);
        [OperationContract]
        bool InsertChiTietDonHangKH(Entities.ChiTietDonHangKH[] ctddhkh, Entities.DonDatHangKH ddhkh);

        [OperationContract]
        Entities.ChiTietDonHangNCC[] SelectChiTietDonHangNCC(string madhhncc);
        [OperationContract]
        bool InsertChiTietDonHangNCC(Entities.ChiTietDonHangNCC[] ctddhncc, Entities.DonDatHangNCC ddhncc);

        [OperationContract]
        Entities.DonDatHangKH[] SelectDonDatHangKH();
        [OperationContract]
        int InsertDonDatHangKH(Entities.DonDatHangKH ddhkh);
        [OperationContract]
        int DeleteDonDatHangKH(Entities.DonDatHangKH ddhkh);

        [OperationContract]
        Entities.DonDatHangNCC[] SelectDonDatHangNhaCungCap();
        [OperationContract]
        int InsertDonDatHangNCC(Entities.DonDatHangNCC ddhncc);
        [OperationContract]
        int DeleteDonDatHangNCC(Entities.DonDatHangNCC ddhncc);

        #endregion
        #endregion

        #region Đào Mạnh Hòa

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        bool CheckRefer(Entities.CheckRefer cr);
        [OperationContract]
        Entities.CongTy Select_CongTy(Entities.CongTy congty);
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.ChiTietHoaDonNhap[] Select_ChiTietHoaDonNhap(Entities.ChiTietHoaDonNhap temp);
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.HoaDonNhap[] Select_HoaDonNhap(Entities.HoaDonNhap temp);
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.SelectAll SelectAll(Entities.SelectAll temp);

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.ChiTietKhoHang[] Select_ChiTietKho(Entities.ChiTietKhoHang chitiet);

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.ChiTietKhoHang[] SelectHangHoa_TrongKho();

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.HangHoa[] Select_HangHoa(Entities.ChiTietKhoHang chitiet);

        #region Thẻ Víp
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.TheVip[] SelectTheVip(string ten);
        // insert update
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int InsertUpdateTheVip(Entities.TheVip thevip);
        #endregion

        #region Loại Thẻ Víp
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.LoaiTheVip[] SelectLoaiTheVip(string hanhdong);
        // insert update
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int InsertUpdateLoaiTheVip(Entities.LoaiTheVip loaithevip);
        // xóa
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int DeleteLoaiTheVip(Entities.LoaiTheVip loaithevip);
        #endregion

        #region Tỷ Lệ Tính
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.TyLeTinh[] SelectTyLeTinh();
        // insert update
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int InsertUpdateTyLeTinh(Entities.TyLeTinh tyletinh);
        #endregion

        #region Điểm Thưởng Khách Hàng
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.DiemThuongKhachHang[] SelectTinhDiemThuong();
        // insert update
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int InsertUpdateTinhDiemThuong(Entities.DiemThuongKhachHang diemthuongkhachhang);
        #endregion

        #region Hóa Đơn Bán Buôn
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.GetID LayIDHDBB(Entities.GetID gitri);
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.HDBanBuon[] SelectHDBanBuon();
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.HDBanBuon[] SelectHDBanBuonID(Entities.HDBanBuon hd);
        // select theo mã khách hàng (loivt)
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.HDBanBuon[] SelectHDBanBuonTheoMaKH(string makh);
        // select theo maHDBanBuon (loivt)
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.HDBanBuon[] SelectHDBanBuonTheoMaHDBanBuon(string mahdbb);

        // insert update
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int InsertUpdateHDBanBuon(Entities.HDBanBuon hdbanbuon);
        #endregion

        #region Chi tiết Hóa Đơn Bán Buôn
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.ChiTietHDBanBuon[] SelectChiTietHDBanBuon();
        #endregion

        #region Hóa Đơn Bán Lẻ
        //get id
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.GetID sp_getID_BanLe(Entities.GetID get);
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.HDBanLe[] SelectHDBanLe();
        // insert update
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int InsertUpdateHDBanLe(Entities.HDBanLe hdbanle);
        #endregion

        #region Chi tiết Hóa Đơn Bán Lẻ
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.ChiTietHDBanle[] SelectChiTietHDBanLe();
        #endregion

        #region Khuyến mại tặng hàng
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.KhuyenMaiTangHang[] SelectKhuyenMaiTangHang();
        // insert update
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int InsertUpdateKhuyenMaiTangHang(Entities.KhuyenMaiTangHang khuyenmaitanghang);
        // delete
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int DeleteKhuyenMaiTangHang(Entities.KhuyenMaiTangHang khuyenmaitanghang);
        #endregion

        #region Chi tiết Khuyến mại tặng hàng
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.ChiTietKhuyenMaiTangHang[] SelectChiTietKhuyenMaiTangHang();
        #endregion

        #region Số Dư Sổ Quỹ
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.SelectSoQuy SelectSSoQuy(string makho);
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.SoDuSoQuy[] SelectSoQuy(string makho);
        // insert
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int InsertSoQuy(Entities.SoDuSoQuy sodusoquy);
        // update
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int UpdateSoQuy(Entities.SoDuSoQuy sodusoquy);
        // update trang thai
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int UpdateTrangThaiSoQuy(Entities.SoDuSoQuy sodusoquy);
        // xóa
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int DeleteSoQuy(Entities.SoDuSoQuy sodusoquy);
        #endregion

        #region Số Dư Công Nợ
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.SoDuCongNo[] SelectCongNoTheoKho(string makho);
        // insert
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int InsertUpdateCongNo(Entities.SoDuCongNo[] nv);
        // update
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        bool UpdateCongNoMang(Entities.SoDuCongNo[] soducongno);
        // xóa
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int DeleteCongNo(Entities.SoDuCongNo soducongno);
        #endregion

        #region Trả Lại Nhà Cung Cấp
        // get id
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.GetID GetIDTraLaiNCC(Entities.GetID id);
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.TraLaiNCC[] SelectTraLaiNCC();
        // insert update
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        int InsertUpdateTraLaiNCC(Entities.TraLaiNCC hdbanle);
        // select
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Entities.ChiTietTraLaiNCC[] SelectChiTietTraLaiNCC();
        #endregion

        #endregion

        #region Vương Trí Lợi

        #region Chinh Sach Gia Hang Hoa
            // select
            [OperationContract]
            Entities.ChinhSachGiaHangHoa[] SelectChinhSachGiaHangHoa();
            // insert update
            [OperationContract]
            bool InsertUpdateChinhSachGiaHangHoa(Entities.ChinhSachGiaHangHoa chinhsachgiahanghoa);
            // xóa
            [OperationContract]
            bool DeleteChinhSachGiaHangHoa(Entities.ChinhSachGiaHangHoa chinhsachgiahanghoa);
            // select hàng hóa và gói hàng trong chính sách giá hàng hóa
            [OperationContract]
            Entities.ChinhSachGiaHangHoa SelectHangHoaCSGHH(Entities.GoiHang gh);

            #region Chi Tiet Chinh Sach Gia Hang Hoa
                // select
                [OperationContract]
                Entities.ChiTietChinhSachGiaHangHoa[] SelectChiTietChinhSachGiaHangHoa();
          
                // insert update
                [OperationContract]
                bool InsertUpdateChiTietChinhSachGiaHangHoa(Entities.ChiTietChinhSachGiaHangHoa[] chitietchinhsachgiahanghoa);
           
                // xóa
                [OperationContract]
                bool DeleteChiTietChinhSachGiaHangHoa(Entities.ChiTietChinhSachGiaHangHoa chitietchinhsachgiahanghoa);
            
            #endregion

        #endregion

        #region KM thu chi
            [OperationContract]
            Entities.KMThuChi[] SelectKMThuChi(Entities.KMThuChi giatri);
            [OperationContract]
            int InsertUpdateKMThuChi(Entities.KMThuChi giatri);
            [OperationContract]
            int DeleteKMThuChi(Entities.KMThuChi giatri);
        #endregion

        #region Nhóm Tài khoản kế toán
            [OperationContract]
            Entities.NhomTKKeToan[] SelectNhomTKKeToan(Entities.NhomTKKeToan giatri);
            [OperationContract]
            int InsertUpdateNhomTKKeToan(Entities.NhomTKKeToan giatri);
            [OperationContract]
            int DeleteNhomTKKeToan(Entities.NhomTKKeToan giatri);

        #endregion

        #region Phieu Chi
            // select
            [OperationContract]
            Entities.PhieuChi[] SelectPhieuChi();
            // SelectPhieuChiTheoDiaDiem
            [OperationContract]
            Entities.PhieuChi[] SelectPhieuChiTheoDiaDiem(string makho);
            // insert update
            [OperationContract]
            bool InsertUpdatePhieuChi(Entities.PhieuChi phieuchi);
            // xóa
            [OperationContract]
            bool DeletePhieuChi(Entities.PhieuChi phieuchi);
            // update du no khach hang
            [OperationContract]
            bool UpdateDuNoKhachHang(Entities.KhachHang khachhang);
            // select du no khach hang
            [OperationContract]
            Entities.KhachHang[] SelectDuNoKhachHang(string makh);
            // update du no nha cung cap
            [OperationContract]
            bool UpdateDuNoNhaCungCap(Entities.NhaCungCap nhacungcap);
            // select du no khach hang 
            [OperationContract]
            Entities.NhaCungCap[] SelectDuNoNCC(string ncc);

            // select
            [OperationContract]
            Entities.KMThuChi[] SelectKMThuChiString(string LoaiKM);
           
        #endregion

        #region Phieu Thu
            // select
            [OperationContract]
            Entities.PhieuThu[] SelectPhieuThu();
            // select follow MaKho
            [OperationContract]
            Entities.PhieuThu[] SelectPhieuThuTheoDiaDiem(string makho);
            // insert update
            [OperationContract]
            bool InsertUpdatePhieuThu(Entities.PhieuThu phieuthu);
            // xóa
            [OperationContract]
            bool DeletePhieuThu(Entities.PhieuThu phieuthu);
            // select NoTKva CoTK
            [OperationContract]
            Entities.TKKeToan[] SelectCoNo(string hanhdong);

        #endregion

        #region Phieu Thanh Toan Khach Hang
            // select
            [OperationContract]
            Entities.PhieuTTCuaKH[] SelectPhieuTTKH();

            // select
            [OperationContract]
            Entities.PhieuTTCuaKH[] SelectPhieuTTKHTheoDiaDiem(string makho);

            // insert update
            [OperationContract]
            bool InsertUpdatePhieuTTKH(Entities.PhieuTTCuaKH phieuthanhtoankhackhang);
            // xóa
            [OperationContract]
            bool DeletePhieuTTKH(Entities.PhieuTTCuaKH phieuthanhtoankhackhang);

            #region Chi Tiet Phieu TTKH
                // select 
                [OperationContract]
                Entities.ChiTietPhieuTTCuaKH[] SelectChiTietPhieuTTKH(string maphieuTTKH);
                // select 1
                [OperationContract]
                Entities.ChiTietPhieuTTCuaKH[] SelectChiTietPhieuTTKH1();
                // insert
                [OperationContract]
                bool InsertUpdateChiTietPhieuTTCuaKH(Entities.ChiTietPhieuTTCuaKH[] chitietphieuttkh);
            #endregion

            #region Cập nhật giá trị của thanh toán sau khi lập phiếu

            // Hóa đơn bán buôn
            [OperationContract]
            bool UpdateTTHDBB(string mahdbanbuon, string phieuttsau);
            // khách hàng trả lại
            [OperationContract]
            bool UpdateKHTraLai(string mahd, string phieuttsau, string loai);

        #endregion

            #region Cập nhật dư nợ của nhà cung cấp
            [OperationContract]
            bool UpdateDuNoKH(string makh, string duno);
        #endregion

            [OperationContract]
            Entities.KhachHangTraLaiBanBuon[] SelectHDKHTraLaiBanBuonTheoMaKH(string makh);
           
        #endregion

        #region Phieu Thanh Toan Nhà Cung Cấp
            // select
            [OperationContract]
            Entities.PhieuTTNCC[] SelectPhieuTTNCC();
            // select
            [OperationContract]
            Entities.PhieuTTNCC[] SelectPhieuTTNCCTheoDiaDiem(string madiadiem);
            // insert update
            [OperationContract]
            bool InsertUpdatePhieuTTNCC(Entities.PhieuTTNCC phieuthanhtoannhacungcap);
            // xóa
            [OperationContract]
            bool DeletePhieuTTNCC(Entities.PhieuTTNCC phieuthanhtoannhacungcap);

            #region Chi Tiet Phieu Thanh Toán Của Nhà Cung Cấp
            // select 
            [OperationContract]
            Entities.ChiTietPhieuTTNCC[] SelectChiTietPhieuTTNCC(string maphieuTTNCC);
            // select 1
            [OperationContract]
            Entities.ChiTietPhieuTTNCC[] SelectChiTietPhieuTTNCC1();
            // insert
            [OperationContract]
            bool InsertUpdateChiTietPhieuTTNCC(Entities.ChiTietPhieuTTNCC[] chitietphieuttncc);

        #endregion

            #region Cập nhật giá trị của thanh toán sau khi lập phiếu của Hóa đơn nhập
            // Update Hóa Đơn Nhập
            [OperationContract]
            bool UpdateHDNhap(string mahdnhap, string phieuttsau);
            // Update Trả Lại Nhà Cung Cấp
            [OperationContract]
            bool UpdateTraLaiNCC(string mahdnhap, string phieuttsau, string loai);
        #endregion

            #region Cập nhật dư nợ của nhà cung cấp
            [OperationContract]
            bool UpdateDuNoNCC(string mancc, string duno);
        #endregion

            [OperationContract]
            Entities.HoaDonNhap[] SelectHDNhapTheoMaNCC(string mancc);

            [OperationContract]
            Entities.TraLaiNCC[] SelectHDTraLaiNCCTheoMaNCC(string mancc);

            [OperationContract]
            Entities.HoaDonNhap[] SelectHDNhapTheoMaHDNhap(string maHDNhap);

        #endregion

        #region Tài khoản kế toán
            [OperationContract]
            Entities.TKKeToan[] SelectTKKeToan(Entities.TKKeToan giatri);

            [OperationContract]
            int InsertUpdateTKKeToan(Entities.TKKeToan giatri);

            [OperationContract]
            int DeleteTKKeToan(Entities.TKKeToan giatri);

        #endregion

        [OperationContract]
            Entities.GiaTriCombox[] SelectTKKT(Entities.GiaTriCombox combox);
          
        [OperationContract]
        Entities.GetCombobox[] SelectComboxCacBang(Entities.GetCombobox combox);

        [OperationContract]
        int InsertUpdateChiTietCongNoKH(Entities.ChiTietCongNoKH khachhang);

        [OperationContract]
        int InsertUpdateChiTietCongNoNCC(Entities.ChiTietCongNoNCC khachhang);

        [OperationContract]
        Entities.ChiTietCongNoKH[] SelectChiTietCongNoKH(Entities.ChiTietCongNoKH chitiet);

        [OperationContract]
        Entities.ChiTietCongNoNCC[] SelectChiTietCongNoNCC(Entities.ChiTietCongNoNCC chitiet);

        [OperationContract]
        Entities.TimKiemNhanVien[] SelecttimKiemNhanVien();

        [OperationContract]
        Entities.NhaCungCap[] SelectNCC();

        [OperationContract]
        Entities.KhachHang[] SelectKH1();

        [OperationContract]
        Entities.NhaCungCap[] Select_NCC();
        #endregion

        #region Nguyễn Trường Sơn
        #region Hàng Hóa
            //Select
            [OperationContract]
        Entities.HangHoa[] SelectHangHoa();
            //Select
            [OperationContract]
            Entities.HangHoa[] SelectHangHoaS(Entities.HangHoa HangHoa);
            //Insert 
            [OperationContract]
            int InsertHangHoa(Entities.HangHoa HangHoa);
            // Update
            [OperationContract]
            int UpdateHangHoa(Entities.HangHoa HangHoa);
            //Xoa
            [OperationContract]
            int DeletedHangHoa(Entities.HangHoa HangHoa);
            [OperationContract]
            Entities.HangHoa[] Select_HangHoaAll(Entities.HangHoa hanghoa);
        #endregion

        #region Kho hàng
        [OperationContract]
        Entities.KhoHang[] SelectKhoHang(Entities.KhoHang khohang);
        //Select
        [OperationContract]
        Entities.KhoHang[] SelectAllKhoHang();
        //Insert 
        [OperationContract]
        int InsertKhoHang(Entities.KhoHang KhoHang);
        // Update
        [OperationContract]
        int UpdateKhoHang(Entities.KhoHang KhoHang);
        //Xoa
        [OperationContract]
        int DeletedKhoHang(Entities.KhoHang KhoHang);
        [OperationContract]
        int DeleteChiTietKhoHang(Entities.ChiTietKhoHang KhoHang);
        [OperationContract]
        Entities.ChiTietKhoHang[] SelectChiTietKhoHang(Entities.ChiTietKhoHang hoadon);
        #endregion

        #endregion
    }
}
#endregion
